package urban_seed_ph

import (
	"fmt"
	"gitee.com/theegg/go-brick/app/model/urban/urban_elements"
	"gitee.com/theegg/go-brick/app/service/app"
)

// 景点  seed
func InitPartnerTourElementsSeed() {

	items := make(map[int]urban_elements.UrbanElements)

	items[410001] = urban_elements.UrbanElements{
		Id:          410001,
		PartnerSign: "default",
		Lang:        "ph",

		Title:     "马尼拉美军公墓",
		TitleEn:   "Manila American Cemetery & Memorial",
		TypeId:    1,
		TypeSubId: 1004,
		Summary:   "美军公墓位于BGC的SM AURA后面, 用来纪念二战牺牲的美军, 环境优雅, 免费开放",
		Content:   "",

		OpenTime:    "07:00",
		CloseTime:   "19:00",
		OpenWeekDay: "1,2,3,4,5,6,7",

		Tags:         "历史,纪念堂,闹中取静",
		FeeTicketHas: false,
		FeeInnerHas:  false,
		FeeAmount:    "可以适当给门卫20P小费",

		Country:    "ph",
		ProvinceId: 1025,
		CityId:     1025017,
		Address:    "Taguig City, Manila, Metro Manila, Philippines",

		CoordinateX: "14.5409127",
		CoordinateY: "121.0481073",
		PlusCode:    "G3R2+C4",

		ImageCover: "",
		ImageList:  "",

		ImageCount:  0,
		ViewCount:   0,
		IsHot:       false,
		IsRecommend: false,
		Status:      1,
	}

	items[410002] = urban_elements.UrbanElements{
		Id:          410002,
		PartnerSign: "default",
		Lang:        "cn",
		Title:       "海洋公园",
		TitleEn:     "Manila Ocean Park",
		TypeId:      1,
		TypeSubId:   1008,
		Summary:     "海洋公园",
		Content:     "",

		OpenTime:    "10:00",
		CloseTime:   "18:00",
		OpenWeekDay: "1,2,3,4,5,6,7",

		Tags: "主题公园,市中心,亲子乐园",

		FeeTicketHas: true,
		FeeInnerHas:  true,
		FeeAmount:    "950P",

		Country:    "ph",
		ProvinceId: 1025,
		CityId:     1025001,
		Address:    "Quirino Grandstand, 666 Behind, Ermita, Manila, 1000 Metro Manila, Philippines",

		CoordinateX: "14.579156",
		CoordinateY: "120.9703611",
		PlusCode:    "HXHF+M2 马尼拉 菲律宾 Metro Manila",

		ImageCover: "",
		ImageList:  "",

		ImageCount:  0,
		ViewCount:   0,
		IsHot:       false,
		IsRecommend: false,
		Status:      1,
	}

	items[410003] = urban_elements.UrbanElements{
		Id:          410003,
		PartnerSign: "default",
		Lang:        "cn",
		Title:       "天际游乐园",
		TitleEn:     "Sky Ranch Tagaytay",
		TypeId:      1,
		TypeSubId:   1001,
		Summary:     "Sky Ranch坐落在塔尔湖旁边的, 俯瞰整个湖景, 是塔盖泰著名的游乐园, 门票50P, 内有摩天轮, 滑钢索, 海盗船等收费项目, 附近停车位充足, 周末可以带孩子或者朋友放松一下",
		Content:     "",

		OpenTime:    "10:00",
		CloseTime:   "22:00",
		OpenWeekDay: "1,2,3,4,5,6,7",

		Tags: "主题公园,风光优美,停车方便",

		FeeTicketHas: true,
		FeeInnerHas:  true,
		FeeAmount:    "50P",

		Country:    "ph",
		ProvinceId: 1014,
		CityId:     1014014,
		Address:    "Km. 60 Tagaytay - Nasugbu Hwy, Kaybagal South, Tagaytay, Cavite, Philippines",

		CoordinateX: "14.0952777",
		CoordinateY: "120.9355611",
		PlusCode:    "3WWQ+43 塔盖泰 菲律宾 Cavite",

		ImageCover: "",
		ImageList:  "",

		ImageCount: 0,
		ViewCount:  0,

		IsHot:       false,
		IsRecommend: false,
		Status:      1,
	}

	items[410004] = urban_elements.UrbanElements{
		Id:          410004,
		PartnerSign: "default",
		Lang:        "cn",
		Title:       "野炊林地",
		TitleEn:     "Tagaytay Picnic Grove",
		TypeId:      1,
		TypeSubId:   1006,
		Summary:     "Tagaytay Picnic Grove坐落在塔尔湖旁边的, 俯瞰整个湖景, 是塔盖泰著名的野炊公园, 门票免费, 内有摩天轮, 观景台, 骑马, 索道等项目, 可以带家人朋友一起来烧烤聚餐等",
		Content:     "",

		OpenTime:    "07:00",
		CloseTime:   "19:00",
		OpenWeekDay: "1,2,3,4,5,6,7",

		Tags: "主题公园,风光优美,假日休闲",

		FeeTicketHas: false,
		FeeInnerHas:  true,
		FeeAmount:    "",

		Country:    "ph",
		ProvinceId: 1014,
		CityId:     1014014,
		Address:    "Tagaytay Picnic Grove Complex, Barangay, End, Tagaytay, Cavite, Philippines",

		CoordinateX: "14.1250704",
		CoordinateY: "120.9958991",
		PlusCode:    "4XGX+26 塔盖泰 菲律宾 Cavite",

		ImageCount:  0,
		ViewCount:   0,
		IsHot:       false,
		IsRecommend: false,
		Status:      1,
	}

	count := 0
	errCount := 0
	for _, item := range items {
		_, err := app.Db().Insert(item)
		if err != nil {
			fmt.Println(err.Error())
			errCount++
		} else {
			count++
		}
	}

	fmt.Printf("%5s|%25s|%10d|%8d|\n", "", "urban_elements", count, errCount)
}
